package koala.kuangjiademo.net;

import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;

import koala.kuangjiademo.util.Helper;


public class DialogProgressStyle implements ProgressStyle {
    private Context context;
    private DialogInterface.OnCancelListener cancelListener;

    public DialogProgressStyle(Context context, DialogInterface.OnCancelListener cancelListener) {
        this.context = context;
        this.cancelListener = cancelListener;
    }

    @Override
    public void showProgress() {
        Dialog dialog = Helper.showProgressDialog(context);
        dialog.setOnCancelListener(cancelListener);
    }

    @Override
    public void dismissProgress() {
        Helper.dismissProgressDialog(context);
    }

    @Override
    public void onProgress(boolean progress) {

    }
}
